import java.util.Scanner;

public class test {
    public static int Jie(int i){
        if(i == 1){
            return 1;
        }
        return i * Jie(i - 1);
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int i = scan.nextInt();
        int func = Jie(i);
        System.out.println(func);
    }
}
